<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head>
    <title>$Title$</title>
    <script src="js/jquery-3.3.1.js"></script>
    <script>
        $(function () {
            $.post("/select","",function (rs) {
                rs=eval("("+rs+")");
                $("#count").text(rs.num);
            });

           $("input").click(function () {
              var num = $("#count").text();
              $.post("/thumpUp","value="+num,function (rs) {
                  $("#count").text(rs);
              });
           });
        })
    </script>
  </head>
  <body>
        <textarea name="note" rows="2" cols="50">今天天气不错</textarea>
        <input type="button" id="btn" name="one" value="点赞">
        <span id="count" style="color: brown"></span>
  </body>
</html>
